<h1>Listing Messages</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Expires on</th>
  </tr>

<% for message in @messages %>
  <tr>
    <td><%=h message.name %></td>
    <td><%=h message.expires_on %></td>
    <td><%= link_to 'Show', message %></td>
    <td><%= link_to 'Edit', edit_message_path(message) %></td>
    <td><%= link_to 'Destroy', message, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<div class="actions">
  <%= link_to 'New Message', new_message_path %>
</div>
